﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cuckoo.TaskSchedule
{
	/// <summary>
	/// 每秒触发的委托
	/// </summary>
	public delegate void SecondTriggerHandle();

	/// <summary>
	/// 计时器接口
	/// </summary>
	public interface ITimer
	{
		/// <summary>
		/// 计时事件
		/// </summary>
		event SecondTriggerHandle SecondTrigger;

		/// <summary>
		/// 触发计时事件
		/// </summary>
		void OnSecondTrigger();

		/// <summary>
		/// 开始计时工作
		/// </summary>
		void Work();

		/// <summary>
		/// 已运行时间
		/// </summary>
		long TotalSecond { get; set; }
	}
}
